<?php

declare (strict_types = 1);

namespace auth\contract;

interface Guard
{
    /**
     * 确定当前用户是否通过认证
     *
     * @return bool
     */
    public function check(): bool;

    /**
     * 确定当前用户的身份是否是游客
     *
     * @return bool
     */
    public function guest(): bool;

    /**
     * 获取当前认证用户
     *
     * @return \auth\contract\Authenticatable|null
     */
    public function user(): ?Authenticatable;
}
